﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Xejen.Ipc.Framework.Flows
{
    /// <summary>
    /// 表示扫描周期大于设定值<see cref="IpcHostConfig.ScanIntervalThreshold"/>时，所引发事件的参数
    /// </summary>
    /// <typeparam name="TData"><inheritdoc cref="IFlow{TData}" path="/typeparam[@name='TData']"/></typeparam>
    public class ScanIntervalExceededEventArgs<TData> : FlowEventArgs<TData>
         where TData : new()
    {
        /// <inheritdoc cref="IpcHostConfig.ScanIntervalThreshold"/>
        public TimeSpan ScanInterval { get; set; }

        /// <summary>
        /// <inheritdoc cref="ScanIntervalExceededEventArgs{TData}"/>
        /// </summary>
        /// <param name="flow"><inheritdoc cref="IFlow{TData}" path="/summary"/></param>
        /// <param name="scanInterval"><inheritdoc cref="ScanInterval" path="/summary"/></param>
        public ScanIntervalExceededEventArgs(IFlowInstance flow, TimeSpan scanInterval) : base(flow)
        {
            ScanInterval = scanInterval;
        }
    }
}
